Dear Statalisters,
Is it correct to use the svy brr syntax with bootstrap weights and svy bootstrap syntax with brr weights? This 2006 post states that it is possible, but not whether it is correct.
https://www.stata.com/statalist/arch.../msg00734.html
This simple demonstration based on the Stata help files shows that the two methods yield identical standard errors up to 24 decimal places. But since there are separate syntax statements for the two methods, I wonder if there are instances where they would yield different results for the same data.
Is it correct to use the svy brr syntax with bootstrap weights and svy bootstrap syntax with brr weights? This 2006 post states that it is possible, but not whether it is correct.
https://www.stata.com/statalist/arch.../msg00734.html
This simple demonstration based on the Stata help files shows that the two methods yield identical standard errors up to 24 decimal places. But since there are separate syntax statements for the two methods, I wonder if there are instances where they would yield different results for the same data.
Code:
. use http://www.stata-press.com/data/r15/nhanes2brr . svyset [pweight = finalwgt], brrweight(brr_1-brr_32) vce(brr) pweight: finalwgt VCE: brr MSE: off brrweight: brr_1 .. brr_32 Single unit: missing Strata 1: <one> SU 1: <observations> FPC 1: <zero> . svy, nodots: mean height Survey: Mean estimation Number of obs = 10,351 Population size = 117,157,513 Replications = 32 Design df = 31 -------------------------------------------------------------- | BRR | Mean Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ height | 168.4599 .14663 168.1608 168.7589 -------------------------------------------------------------- . display %36.24f _se[height] 0.146629979913073582586946 . . svyset [pweight = finalwgt], bsrweight(brr_1-brr_32) vce(bootstrap) pweight: finalwgt VCE: bootstrap MSE: off bsrweight: brr_1 .. brr_32 Single unit: missing Strata 1: <one> SU 1: <observations> FPC 1: <zero> . svy, nodots: mean height Survey: Mean estimation Number of obs = 10,351 Population size = 117,157,513 Replications = 32 -------------------------------------------------------------- | Observed Bootstrap Normal-based | Mean Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ height | 168.4599 .14663 168.1725 168.7473 -------------------------------------------------------------- . display %36.24f _se[height] 0.146629979913073582586946 . . ********************************************************************** . . use http://www.stata-press.com/data/r15/nmihs_bs, clear . svyset [pweight = finwgt], brrweight(bsrw1-bsrw1000) vce(brr) pweight: finwgt VCE: brr MSE: off brrweight: bsrw1 .. bsrw1000 Single unit: missing Strata 1: <one> SU 1: <observations> FPC 1: <zero> . svy, nodots: mean birthwgt Survey: Mean estimation Number of obs = 9,946 Population size = 3,895,562 Replications = 1,000 Design df = 999 -------------------------------------------------------------- | BRR | Mean Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ birthwgt | 3355.452 6.520637 3342.657 3368.248 -------------------------------------------------------------- . display %36.24f _se[birthwgt] 6.520636700651118999871869 . svyset [pweight = finwgt], bsrweight(bsrw1-bsrw1000) vce(bootstrap) pweight: finwgt VCE: bootstrap MSE: off bsrweight: bsrw1 .. bsrw1000 Single unit: missing Strata 1: <one> SU 1: <observations> FPC 1: <zero> . svy, nodots: mean birthwgt Survey: Mean estimation Number of obs = 9,946 Population size = 3,895,562 Replications = 1,000 -------------------------------------------------------------- | Observed Bootstrap Normal-based | Mean Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ birthwgt | 3355.452 6.520637 3342.672 3368.233 -------------------------------------------------------------- . display %36.24f _se[birthwgt] 6.520636700651118999871869
Comment